package cn.jietuo.first.cartoonalgorithm;

import java.text.NumberFormat;
import java.util.Locale;

/**
 * @author zhangx & jietuo_zx@163.com
 * @version 1.0
 * @date 2020/7/27
 * @description:
 */
public class A {


    public static void main(String[] args)  {
        String s = "123.456789d";
        double d = 123.456789d;
        NumberFormat nf = NumberFormat.getNumberInstance(Locale.FRANCE);
        NumberFormat ne = NumberFormat.getNumberInstance(Locale.ENGLISH);
        nf.setMaximumFractionDigits(2);
        ne.setMaximumFractionDigits(3);
        System.out.println(nf.format(d) + " ");
        System.out.println(ne.format(d) + " ");
        try{
            System.out.println(nf.parse(s));
            System.out.println(ne.parse(s));
        }catch (Exception e){
            System.out.println(e.getClass());
        }


        System.out.println("----------");
//        Long l = new Long(1234);
//        Long l1 = l;
//        if (l == l1){
//            System.out.println();
//        }

        String s1 = String.valueOf(1);
        String s2 = new Integer(1).toString();

        Integer number1 = new Integer(1);
        Integer number2 = number1;
        number1 += 1;
        System.out.println(number1);
        System.out.println(number2);

    }
}
